const Router = require("koa-router")
const router = new Router({ prefix: "/project" })

const { getProjectList, removeProject, createProject, updateProject, getProject } = require("../controller/project-controller")

// 获取所有项目列表
router.get("/", getProjectList)
// 根据项目id获取项目信息
router.get("/:projectId", getProject)
// 删除项目
router.delete("/:projectId", removeProject)
// 创建项目接口
router.post("/", createProject)
// 更新项目接口
router.patch("/:projectId", updateProject)

module.exports = router